package com.dongjiantong.user.mapper;

import com.dongjiantong.mybatis.MyMapper;
import com.dongjiantong.user.model.Farms;
import com.dongjiantong.user.model.dtos.FarmsDto;

import java.util.List;
import java.util.Map;

/**
 * Created by cao on 2017/11/9.
 */
public interface FarmsMapper extends MyMapper<Farms> {

    List<Farms> selectByFarmIds(List<Long> ids);


    List<Farms> selectByUserId(Long userId);

    List<Farms> selectByMap(Map map);


    /**
     * 带存栏查询
     *
     * @param map
     * @return
     */
    List<FarmsDto> selectFarmStock(Map map);



    List<String> selectFarmVillage(Map map);

    List<Farms> findFarmByAreaForV(Map<String, Object> map);

    List<Long> selectTotalQuantity(Map map);

    /**
     * 政府人员根据其管辖区域查询区域内已经养殖的畜种列表(二级畜种)
     * @param map
     * @return 畜种code list
     */
    List<Integer> selectFarmBreedTypeByGovUserId(Map<String,Object> map);
}
